// **********************************************************************
//
// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

// Ice version 3.2.1

package ru.fizteh.fivt.demo.calc;

public abstract class AMI_CalcNumber_mult extends IceInternal.OutgoingAsync
{
    public abstract void ice_response(ru.fizteh.fivt.demo.ntypes.MyNumber __ret);
    public abstract void ice_exception(Ice.LocalException ex);
    public abstract void ice_exception(Ice.UserException ex);

    public final void
    __invoke(Ice.ObjectPrx __prx, AMI_CalcNumber_mult __cb, ru.fizteh.fivt.demo.ntypes.MyNumber x, ru.fizteh.fivt.demo.ntypes.MyNumber y, java.util.Map<String, String> __ctx)
    {
        try
        {
            __prepare(__prx, "mult", Ice.OperationMode.Normal, __ctx);
            __os.writeObject(x);
            __os.writeObject(y);
            __os.writePendingObjects();
            __os.endWriteEncaps();
        }
        catch(Ice.LocalException __ex)
        {
            __finished(__ex);
            return;
        }
        __send();
    }

    protected final void
    __response(boolean __ok)
    {
        ru.fizteh.fivt.demo.ntypes.MyNumberHolder __ret = new ru.fizteh.fivt.demo.ntypes.MyNumberHolder();
        try
        {
            if(!__ok)
            {
                try
                {
                    __is.throwException();
                }
                catch(ru.fizteh.fivt.demo.ntypes.MyNumberFormatException __ex)
                {
                    ice_exception(__ex);
                    return;
                }
                catch(Ice.UserException __ex)
                {
                    throw new Ice.UnknownUserException(__ex.ice_name());
                }
            }
            __is.readObject(__ret.getPatcher());
            __is.readPendingObjects();
        }
        catch(Ice.LocalException __ex)
        {
            __finished(__ex);
            return;
        }
        ice_response(__ret.value);
    }
}
